<include file="Public:header" />
<style type="text/css">
    ul li{
        list-style: none;
        margin-bottom: 15px;
    }
</style>
<!-- main content start-->
<div class="main-content" >

    <!-- header section start-->
    <div class="header-section">

        <!--toggle button start-->
        <a class="toggle-btn"><i class="fa fa-bars"></i></a>
        <!--toggle button end-->
        <!--notification menu start -->
        <div class="menu-right">
            <ul class="notification-menu">
                <li>
                    <a href="#" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
                        <img src="__IMG__/photos/user-avatar.png" alt="" />
                        {$shopname}
                        <span class="caret"></span>
                    </a>
                    <ul class="dropdown-menu dropdown-menu-usermenu pull-right">
                        <li><a href="{:U('Rootadmin/Login/changePwd')}"><i class="fa fa-cog"></i>  修改密码</a></li>
                        <li><a href="{:U('Rootadmin/Login/logout')}"><i class="fa fa-cog"></i>  退出登录</a></li>
                    </ul>
                </li>

            </ul>
        </div>
        <!--notification menu end -->

    </div>
    <!-- header section end-->
    <!-- page heading start-->
    <div class="page-heading">
        <h3>
            系统设置
        </h3>
        <ul class="breadcrumb">
            <li>
                <a href="#">首页</a>
            </li>
            <li> 系统设置 </li>
            <li class="active"> 添加管理员 </li>
        </ul>
    </div>
    <!-- page heading end-->
    <!--body wrapper start-->
    <div class="wrapper">
        <section class="panel">
            <header class="panel-heading">
                添加管理员
            </header>
            <div class="panel-body">
                <form class="form-horizontal" role="form" enctype="multipart/form-data" method="post" >
                    <div class="form-group">
                        <label class="col-md-2 col-sm-2 control-label">账号</label>
                        <div class="col-md-6 col-sm-6">
                            <input type="text" name="name" id="name" class="form-control" placeholder="管理员账号">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-2 col-sm-2 control-label">密码</label>
                        <div class="col-md-6 col-sm-6">
                            <input type="password" name="password" id="password" class="form-control" placeholder="管理员密码">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-2 col-sm-2 control-label">确认密码</label>
                        <div class="col-md-6 col-sm-6">
                            <input type="password" name="passwordok" id="passwordok" class="form-control" placeholder="确认密码">
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-lg-offset-2 col-md-6 col-sm-6">
                            <button type="submit" class="btn btn-primary" onclick="return checkout()">确认添加</button>
                            <button type="button" class="btn btn-primary" onclick="history.go(-1)">返回</button>
                        </div>
                    </div>
                </form>
            </div>
        </section>
    </div>
    <!--body wrapper end-->
    <!-- main content end-->
    <script>
        function checkout(){
            if($("#name").val()==""){
                toast("管理员账号不得为空",false);
                return false;
            }
            if($("#password").val()==""){
                toast("密码不得为空",false);
                return false;
            }
            if($("#passwordok").val()==""){
                toast("确认密码不得为空",false);
                return false;
            }
            if($("#password").val()!=$("#passwordok").val()){
                toast("两次输入的密码不一致",false);
                return false;
            }
            return true;
        }
    </script>
    <include file="Public:footer" />